Image editing device and image editing method

ABSTRACT

An image editing device of the present invention replaces part of a first image that has been subjected to lossy compression with a second image, and comprises a image quality adjustment section for carrying out image quality conversion processing that is the same as image quality variation arising due to the lossy compression, and an editing section for carrying out editing processing using the second image that has been adjusted by the image quality adjustment section.

Benefit is claimed, under 35 U.S.C. §119, to the filing date of prior Japanese Patent Application No. 2012-213257 filed on Sep. 26, 2012. This application is expressly incorporated herein by reference. The scope of the present invention is not limited to any requirements of the specific embodiments described in the application.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image editing device for editing an image such as a combined photograph made up of a plurality of photographs, and to an imaging editing method.

2. Description of the Related Art

Conventionally, it has been known to display a plurality of images on a screen, such as a multiscreen for displaying a plurality of preview images on a liquid crystal monitor, or index playback for displaying a list of a plurality images that have been taken. Technology has also been proposed to divide sections that are important and sections that are not important within an image, and compare image degradation of important sections with unimportant sections to reduce image degradation (refer, for example, to Japanese Patent laid-open No. Hei. 05-083566). It is also common practice to compress and store images using a compression technique such as JPEG etc.

SUMMARY OF THE INVENTION

An object of the present invention is to provide an image editing device, and an image editing method, capable of image editing of a combined photograph made up of a plurality of images, that appears natural and without any sense of incongruity, even if some of the images are exchanged.

An image editing device of the present invention, for replacing part of a first image that has been subjecting to lossy compression with a second image, comprises: an image quality adjustment section for performing image quality conversion processing, that is the same as image quality variation occurring due to the lossy compression, on the second image, and an editing section for carrying out editing processing using the second image that has been subjected to adjustment by the image quality adjustment section.

An image editing device of the present invention, for editing a combined photographic image formed by combining a plurality of images, comprises: a first image designation section for designating a pair of images from a plurality of images that make up the combined image; a second image designation section for designating a replacement image for replacing the image that has been designated by the 1st image designation section; an image compression processing section for subjecting an image to lossy compression with quantization table values that represent the combined photographic image; an image quality adjustment section for carrying out image quality adjustment processing, that is the same as image degradation occurring as a result of the lossy compression, on the replacement image; a storage section for storing the image and the quantization table values; and a control section for subjecting the replacement image that has been designated by the second image designation section to lossy compression with the quantization table values in the image quality adjustment section, and replacing with an image that has been designated by the first image designation section after expansion.

An image editing method of the present invention, for replacing part of a first image that has been subjecting to lossy compression with a second image, comprises: a step for carrying out image quality conversion processing, that is the same as image degradation arising due to the lossy compression, on the second image; and a step of carrying out the editing processing using the 2nd image that has been adjusted.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram mainly showing the electrical structure of a camera of one embodiment of the present invention.

FIG. 2 is a drawing showing one example of image-editing, in a camera of one embodiment of present invention, and shows the appearance of carrying out image editing by touching a preview.

FIG. 3 is a drawing showing one example of image-editing, in a camera of one embodiment of present invention, and shows the appearance of carrying out image editing by touching a preview.

FIG. 4 is a drawing showing one example of image-editing, in a camera of one embodiment of present invention, and shows the appearance of deciding an editing frame.

FIG. 5 is a drawing showing an example of screen division, with the camera of one embodiment of the present invention.

FIG. 6 is a flowchart showing main operation of the camera of one embodiment of the present invention.

FIG. 7 is a flowchart showing main operation of the camera of one embodiment of the present invention.

FIG. 8 is a flowchart showing operation of image processing of the camera of one embodiment of the present invention.

FIG. 9 is a flowchart showing operation of basic image processing of the camera of one embodiment of the present invention.

FIG. 10 is a flowchart showing operation of special image processing of the camera of one embodiment of the present invention.

FIG. 11 is a flowchart showing operation of combined photograph formation of the camera of one embodiment of the present invention.

FIG. 12A-FIG. 12C are drawings showing a modified example of image analysis, with the camera of one embodiment of the present invention.

FIG. 13 is a flowchart showing operation of still image storage for the camera of one embodiment of the present invention.

FIG. 14 is a flowchart showing operation of combined photograph manipulation of the camera of one embodiment of the present invention.

FIG. 15 is a flowchart showing operation of combined photograph manipulation of the camera of one embodiment of the present invention.

FIG. 16A-FIG. 16C are drawings of the structure of combined photograph manipulation memory, with the camera of one embodiment of the present invention.

FIG. 17 is a flowchart showing playback and editing operations of the camera of one embodiment of the present invention.

FIG. 18 is a flowchart showing operation of combined photograph editing of the camera of one embodiment of the present invention.

FIG. 19 is a flowchart showing operation of combined photograph formation and storage of the camera of one embodiment of the present invention.

FIG. 20A-FIG. 20C are flowcharts showing operation of image quality adjustment of the camera of one embodiment of the present invention.

FIG. 21A-FIG. 21B are flowcharts showing operation of image quality adjustment of the camera of one embodiment of the present invention.

FIG. 22A-FIG. 22D are flowcharts showing operation of image quality changing processing of the camera of one embodiment of the present invention.

FIG. 23 is a drawing for explaining the effect of image quality adjustment, in the camera of one embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In the following, preferred embodiments using a camera adopting the present invention will be described using the drawings. A camera of one embodiment of the present invention is a digital camera, and has an imaging section, with a subject image being converted to image data by this imaging section, and the subject image then being subjected to live view display on a display section arranged on a rear surface of a main body based on this converted image data. A photographer determines composition and photo opportunity by looking at the live view display. At the time of a release operation image data is stored in a storage medium. Image data that has been stored in the storage medium can be played back and displayed on the display section if playback mode is selected.

Also, a display section is capable of dividing a screen into a plurality of screens, and carrying out playback display of a combined photograph formed from a plurality of images. A photograph of apart within this combined photograph may be replaced with a live view image, or an image that has already been taken and is stored in a storage medium. In this case, a replacement image is subjected to image quality adjustment using a quantization table for the combined photograph, so that image quality of the replacement image and other combined photographs becomes the same. As a result, even if part of a combined photograph is replaced with another image, a resultant combined photograph has unity and gives a natural impression. In this way, the camera of this embodiment functions as an image editing device for replacing part of the first image that has been subjected to lossy compression (image of combined photograph) with a second image (replacement image).

FIG. 1 is a block diagram mainly showing the electrical structure of a camera of one embodiment of the present invention. This camera comprises a camera body 100 and an interchangeable lens 200 that can be attached to and removed from the camera body. With this embodiment, the photographing lens is an interchangeable lens, but this is not limiting, and it is also possible to have a digital camera of a type where a photographing lens is fixed to the camera body.

The interchangeable lens 200 is made up of a photographing lens 201, a diaphragm 203, a driver 205, a microcomputer 207 and a flash memory 209, and has an interface (hereafter referred to as I/F) 300 between the interchangeable lens 200 and the camera body 100, which will be described later.

The photographing lens 201 is constituted by a plurality of optical lenses for forming a subject image, and is a fixed focal length lens or a zoom lens. The diaphragm 203 is arranged to the rear on the optical axis of this photographing lens 201, and the diaphragm 203 has a variable aperture to control amount of subject light flux passing through the photographing lens 201. Also, the photographing lens 201 is capable of being moved in the optical axis direction by the driver 205, with focus position of the photographing lens 201 being controlled based on control signals from the microcomputer 207, and in the case where the photographing lens 201 is a zoom lens, focal length is also controlled. The driver 205 also controls aperture of the diaphragm 203.

The microcomputer 207 that is connected to the driver 205 is connected to the I/F 300 and the flash memory 209. The microcomputer 207 operates in accordance with a program stored in the flash memory 209, to perform communication with a microcomputer 121 within the camera body 100, which will be described later, and performs control of the interchangeable lens 200 based on control signals from the microcomputer 121.

Besides the previously described program, various information such as optical characteristics of the interchangeable lens 200 and adjustment values are stored in the flash memory 209. The I/F 300 is an interface for carrying out communication between the microcomputer 207 inside the interchangeable lens 200 and the microcomputer 121 inside the camera body 100.

Inside the camera body 100, a mechanical shutter 101 is arranged on the optical axis of the photographing lens 201. This mechanical shutter 101 controls the time for which subject light flux passes, and a well-known focal plane shutter or the like is adopted. Behind this mechanical shutter 101, an image sensor 103 is arranged at a position where the subject image is formed by the photographing lens 201.

The image sensor 103 has photodiodes that constitute each pixel arranged two-dimensionally in a matrix shape, each photodiode generates photoelectric conversion current in accordance with received light amount, and this photoelectric conversion current is the subject of charge storage by a capacitor connected to each photodiode. A Bayer array RGB filter is arranged on the front surface of each pixel. The image sensor 103 is not limited to a Bayer array, and various types such as Foveon (Registered trademark), for example, can also be used.

The image sensor 103 is connected to an analog processing section 105, and this analog processing section 105 performs wave shaping on the photoelectric conversion signals (analog image signals) that have been read out from the image sensor 103 after reducing reset noise etc., and also carries out gain increase so as to achieve an appropriate brightness.

This analog processing section 105 is connected to an A/D conversion section 107, and this A/D conversion section 107 performs analog to digital conversion on the analog image signals, and outputs the digital image signals (hereafter referred to as image data) to a bus 110. In this application, raw image data generated before image processing in the image processing section 109 is called RAW data.

The bus 110 is a transfer path for transferring various data, that has been read out or generated inside the camera body 100, within the camera body 100. Besides the previously described A/D conversion section 107, an image processing section 109, AE (Auto Exposure) processing section 111, AF (Auto Focus) processing section 113, image compression and expansion section 115, communication section 117, the microcomputer 121, an SDRAM (synchronous DRAM) 127, memory interface (hereafter referred to as memory I/F) 129, and display driver 133 are connected to the bus 110.

The image processing section 109 is made up of a basic image processing section 109 a for carrying out basic image processing, a special image processing section 109 b for applying special effects in the case where art filter has been set, a combined photograph processing section 109 c for carrying out editing processing for a combined image formed by combining a plurality of photographs into a singe image, and a subject detection section 109 d for analyzing an image.

The basic image processing section 109 a performs optical black (OB) subtraction processing, white balance (WB) correction, demosaicing processing in the case of Bayer data, gamma/color reproduction processing, color matrix computation, noise reduction (NR) processing, edge enhancement processing etc. on RAW data. In a single exposure, and if art filter has not been set, image processing is completed with only processing by this basic image processing section 109 a.

Also, the special image processing section 109 b applies various special effects to an image that has been processed by the basic image processing section, such as a pin hole effect to lower peripheral brightness, a soft focus effect to combine an original image with an image that has been blurred, a noise effect to combine with a noise image, a cross filter effect to draw cross patterns on bright points, a miniature effect to blur peripheral portions etc., in accordance with a special effect (art filter) that has been set.

The combined photograph processing section 109 c forms a single image (combined photograph) by combining a plurality of images. In combining images, a template (refer to FIG. 5 which will be described later) is read out from flash memory 125, and brightness change is carried out using gamma correction within the basic image processing section 109 a so that brightness of the images becomes the same. Also, WB is changed using color reproduction processing within the basic image processing section 109 a, in order to unify the overall white balance (WB). Also, a special effect such as a pinhole effect is applied after combination using the special image processing section 109 b, and correction etc. of an incorporation image and a replacement image is carried out.

The combined photograph processing section 109 c fulfills a function as an image quality adjustment section for carrying out image quality conversion processing, that is the same as the image degradation occurring as a result of lossy compression, on a second image (replacement image) (refer to S128 in FIG. 11). The combined photograph processing section 109 c also fulfills a role as an editing section for carrying out editing processing using the second image (replacement image) that has been adjusted by the image quality adjustment section (refer to S133 in FIG. 11).

The combined photograph processing section 109 c also functions as an image quality adjustment section for carrying out processing that is the same as the image degradation caused by quantization error arising as a result of lossy compression. The combined photograph processing section 109 c also functions as an image quality adjustment section for carrying out lossy compression and expansion (refer to FIG. 22A). The combined photograph processing section 109 c also functions as an image quality adjustment section for carrying out processing that is the same as the image degradation caused by quantization error arising as a result of lossy compression (refer to FIG. 22B). The combined photograph processing section 109 c also functions as an image quality adjustment section for carrying out low pass filter processing (refer to FIG. 22C).

The subject detection section 109 d detects a subject such as a person's face or a pet, by analysis of an image using pattern matching etc. In the event that it is possible to detect a subject, information such as the type, size, position and reliability etc. of the subject within an image is acquired.

The AE processing section 111 measures subject brightness based on image data that has been input via the bus 110, and outputs this subject brightness information to the microcomputer 121 via the bus 110. A dedicated photometric sensor for subject brightness measurement may be provided, but in this embodiment subject brightness is calculated based on image data.

The AF processing section 113 extracts signals for high frequency components from image data, acquires a focus evaluation value using integration processing, and outputs the focus evaluation value via the bus 110 to the microcomputer 121. In this embodiment, focusing of the photographing lens 201 is carried out using the so-called contrast method. With this embodiment AF control using a contrast method is given as an example, but it is also possible to carry out focusing by AF control using phase difference AF, where a phase difference sensor is provided on the optical path, or a phase difference sensor is provided on an image sensor.

At the time of storage of image data to the storage medium 131, the image compression and expansion section 115 subjects image data that has been read out from the SDRAM 127 to compression in accordance with various compression formats such as JPEG compression in the case of a still picture or MPEG in the case of a movie. The microcomputer 121 attaches a header necessary for configuring a JPEG file or an MPO file or MPEG file to the JPEG image data or MPEG image data, to create a JPEG file or an MPO file or MPEG file, and stores the created file in the storage medium 131 via the memory I/F 129.

The image compression and expansion section 115 also carries out expansion of JPEG image data and MPEG image data for image playback display. In the expansion, a file that is stored in the storage medium 131 is read out, and after being subjected to expansion processing in the image compression and expansion section 115 the expanded image data is temporarily stored in the SDRAM 127. With this embodiment, the JPEG compression system and MPEG compression system are adopted as the image compression system, but the compression system is not limited to this and another compression systems may be used, such as TIFF, H.264 etc.

The communication section 117 performs communication with external sections by means of wire communication using USB or LAN etc., or wireless communication. Templates for division of combined photographs that are stored within the flash memory 125 are updated or added by means of the communication section 117.

The microcomputer 121 provides a function as a control section for this entire camera, and performs overall control of various sequences of the camera. Besides the previously described I/F 300, an operation section 123 and a flash memory 125 are connected to the microcomputer 121.

The operation section 123 includes operation members such as various input buttons, like a power supply button, release button, a movie button, playback button, menu button, cross-shaped key, OK button, delete button, magnification button and various input keys, and detects operating states of these operation members and outputs the result of detection to the microcomputer 121. The microcomputer 121 executes various sequences according to user operation based on the result of detection of the operation members from the operation section 123. The power supply button is an operation member for instructing to turn a power supply of the digital camera on or off. If the power supply button is pressed, the power supply of the digital camera is turned on, and if the power supply button is pressed once again the power supply of the digital camera is turned off.

The release button is made up of a first release switch that turns on when the button is pressed down half way, and a second release switch that is turned on when the button is pressed down further from the half-pressed state to be pressed down fully. The microcomputer 121 executes shooting preparation sequences such as an AE operation and AF operation if the first release switch is turned on. Also, if the second release switch is turned on shooting is carried out by executing a series of shooting sequences to control the mechanical shutter 101 etc., acquire image data based on a subject image from the image sensor 103 etc., and store this image data in the storage medium 131.

The movie button is an operation button for designating start or finish of movie shooting, and if the movie button is initially operated movie shooting commences, and movie shooting finishes when it is operated again. The playback button is an operation button for setting and canceling playback mode settings, and if playback mode is set image data of a taken image is read out from the storage medium 131, and a taken image is playback displayed on the display panel 135. The delete button is an operation button for designating and deleting an image in cases such as where playback images are displayed as a list, or a combined photograph is being displayed, for example. The magnification button is an operation button for enlarging a display image at the time of playback display.

The menu button is an operation button for causing display of menu screens on the display panel 135. It is possible to carry out the various camera settings on the menu screens. As camera settings there are shooting mode settings such as normal shooting mode and combined photograph for example, and finish settings such as natural, vivid, flat, portrayed, art filter etc. As art filters there are pop art, toy photo, fantastic focus, rough monochrome, Diorama, Crystal etc. It is also possible to have various settings on the menu screens, such as style of a combined photograph, selection of the replacement image for a combined photo, and whether or not an image before editing will be stored at the time of editing a combined photograph. In the case of a combined photograph, display of a live view (LV) image is updated in accordance with a filter and incorporation image selection state (refer to S47 in FIG. 7).

A touch input section 123 a is also provided on the operation section 123. The display panel 135 is capable of touch operation, and the touch input section 123 a detects a position that has been touched by a user etc. and outputs to the microcomputer 121.

The flash memory 125 stores a program for executing the various sequences of the microcomputer 121. The microcomputer 121 carries out overall control of the camera based on this program.

The SDRAM 127 is an electrically rewritable volatile memory for temporary storage of image data etc. This SDRAM 127 temporarily stores image data that has been output from the A/D conversion section 107, and image data that has been processed in the image processing section 109 and image compression and expansion section 115 etc.

The memory I/F 129 is connected to the storage medium 131, and carries out control for reading and writing of data, such as image data and headers attached to image data, to and from the storage medium 131. The storage medium 131 is a storage medium such as a memory card that can be loaded into and taken out of the camera body 100, but this is not limiting and it may also be a hard disk or the like built into the camera body 100.

The LCD driver 133 is connected to the display panel 135, and reads out from the SDRAM 127 and storage medium 131 to display an image on the display panel 135 based on image data that has been expanded by the image compression and expansion section 115. The display panel 135 is arranged on a rear surface of the camera body 100, and carries out image display. As image display modes, there are Quickview Display for displaying stored image data for only a short time, playback display of image files for still images and movies that have been stored in the storage medium 131, and movie display such as live view display. As a display section it is possible to adopt various display panels such as a liquid crystal display panel (LCD), or organic EL etc.

Next, editing operations for a combined photograph of the camera of this embodiment will be described using FIG. 2 to FIG. 5. FIG. 2 shows live view display for the case where combined photograph mode is selected, and a screen of the display panel 135 has been divided into 4. Diagonal lines within a divided screen (double lines close to the elbows of a person and double lines behind the legs) indicate that a subject is moving. The appearance of the subject is shown on the left side of FIG. 2, while the right side shows a display state of the display panel 135.

First, as shown in 135 a of FIG. 2, within the 4 divided screens live view display is performed on the upper left screen. If the user touches the upper left of the display panel 135 when they wish to acquire this as an image for the combined photograph, then as shown in 135 b shooting is decided and live view display is carried out on the next screen (upper right screen). Next, 135 c is the appearance of deciding shooting for the upper right screen, while 135 d shows the appearance of deciding shooting for the lower left screen. If shooting of the lower right screen is decided (refer to 135 e), shooting is completed and a combined photograph is possible.

With the example shown in FIG. 2, shooting is decided by touching the display panel 135, and live view is performed in order at the upper left→upper right→lower left→lower right. However, live view display does not have to be carried out in this order. For example, as shown in FIG. 3, it is also possible to carry out live view display such that when live view display is being performed on the upper left screen (refer to 135 f in FIG. 3), if the lower left screen which is not performing live view display is touched, live view display is then performed on this screen (refer to 135 g in FIG. 3). The actual operation of updating this shooting frame will be described later using steps S161 and S163 in FIG. 14.

Also, in FIG. 2 shooting is decided if the display panel 135 is touched during live view display, but even with a screen that has been decided, the live view display screen can be returned to if the display panel 135 is touched again. With the display panel 135 h shown in FIG. 3, shooting has been decided on 3 screens (upper left, upper right, and lower left screens), but if the lower left screen for which shooting has been decided is touched, the lower left screen of the display panel 135 j becomes a live view display screen.

Also, with this embodiment, even after shooting has been decided for all frames, and a combined photograph has been formed, it is possible to replace some of the images with another image. For example, FIG. 4 shows a situation where four images have been decided, but the user has specified to replace the image on the lower right screen with another image. With this embodiment, the frame of the image is displayed by touching, to indicate that it is an image to be recombined.

With examples of combined photographs shown in FIG. 2 to FIG. 4, they have been divided into 4, namely upper left, upper right, lower left, and lower right, but the division of the screen is not limited to this. For example, it is also possible to divide into various formats, as shown in FIG. 5. The format of this division (template, style) is stored in the flash memory 125, so that the user can set according to taste.

Next, main processing of the camera of this embodiment will be described using the flowcharts shown in FIG. 6 and FIG. 7. The flowcharts shown in FIG. 6-FIG. 11, FIG. 13-FIG. 15, and FIG. 17-FIG. 22D are executed by the microcomputer 121 controlling each section in accordance with programs stored in the flash memory 125.

If the power supply button within the operation section 123 is operated and the power supply is turned on, operation of the main flow shown in FIG. 6 is started. Once operation has commenced, initialization is first executed (S1). As part of the initialization, mechanical initialization and electrical initialization, such as initialization of various flags etc., are carried out. As one of the various flags, a storage in progress flag indicating whether or not movie storage is in progress is reset to off (refer to Steps S13 and S15).

Once initialization has been carried out, it is next determined whether or not the playback button has been pressed (S3). Here, determination is carried out by detecting the operating state of the playback button within the operation section 123. If the result of this determination is that the playback button has been pressed, playback/editing mode is executed (S5). Here, image data is read out from the storage medium 131, and a table of still images and movies is displayed on the LCD 135. The user selects an image from within the table by operating the cross-shaped key and decides on the image using the OK button. Editing of a combined photograph is also carried out in this step. Detailed operation of this playback/editing will be described later using FIG. 17.

If playback/editing is executed in step S5, or if the result of determination in step S3 was that the playback button had not been pressed, it is determined whether or not camera setting will be carried out (S7). When the menu button within the operation section 123 has been operated, camera setting is carried out on a menu screen. In this step therefore, determination is based on whether or not this camera setting has been carried out.

If the result of determination in step S7 is camera setting, camera setting is carried out (S9). As described previously, it is possible to carry out various camera settings on the menu screens. As camera settings there are, as described previously, shooting mode settings such as normal shooting mode and combined photograph, for example, and finish settings such as natural, vivid, flat, portrait, art filter etc. As art filters there are pop art, toy photo, fantastic focus, rough monochrome, Diorama, Crystal etc. Various settings are also possible such as style of a combined photograph, selection of a replacement image for a combined photograph, whether or not an image before editing will be stored at the time of combined photograph editing, selection of an image for embedding an already stored image in a specified frame of a combined photograph, etc.

If camera setting has been carried out in step S9, or if the result of determination in step S7 was not camera setting, it is next determined whether or not the movie button has been pressed (S11). Here the microcomputer 121 carries out determination based on operating state of the movie button input from the operation section 123.

If the result of determination in step S11 is that the movie button has been pressed, the storage in progress flag is determined (S13). The storage in progress flag is set to on (1) if movie storage is progress, or set to off (0) if a movie is not being shot. In this step the flag is inverted, that is, if is set to on (1) it is inverted to off (0), and if it is set to off (0) it is inverted to on (1).

Once inversion of the storage in progress flag has been carried out in step S13, it is next determined whether or not storage of a movie is in progress (S15). Here, determination is based on whether the storage in progress flag, which was inverted in step S13, is set to on or set to off.

If the result of determination in step S15 is that movie storage is in progress, a movie file is created (S19). Movie storage is carried out in step S61, which will be described later, but in this step a movie file for movie storage is created, and preparation so as to be able to store image data of the movie is performed.

On the other hand, if the result of determination is that move storage is not in progress, the movie file is closed (S17). The movie file is closed in this step because the movie button has been pressed and movie shooting is completed. When closing the movie file, the movie file is placed in a state of being capable of being played back by storing a number of frames in a header of the movie file etc., and file writing is completed.

Once the movie file has been closed in step S17, or if a movie file is created in step S19, or if the result of determination in step S11 was that the movie button was not pressed, it is next determined whether or not the operation section has been operated in combined photograph mode (S21). As described previously, setting of combined photograph mode is possible in the camera settings of step S9. In this step it is determined whether or not an operating section of the operation section 123 was operated in a state where this combined photograph mode is set.

If the result of determination in step S21 is that an operating section has been operated in combined photograph mode, a combined photograph operation is executed (S23). With this combined photograph operation, various operations for carrying out editing of the combined photograph, for example, shooting frame update, cancel operation, restoration operation, temporary save operation, temporary save and write operation, etc. are carried out. Detailed operation of this combined photograph operation will be described later using FIG. 14 and FIG. 15.

If playback/editing has been executed in step S23, or if the result of determination in step S21 was that an operating section was not operated in combined photograph mode, it is determined whether or not the release button has been pressed down halfway, in other words, whether or not the first release switch and gone from off to on (S31). For this determination, the state of the first release switch that is linked to the release button is detected by the operation section 123, and determination is carried out based on the result of detection. If the result of detection is that the first release switch has changed from off to on, the result of determination becomes Yes, while on the other hand if an on state or an off state is maintained the result of determination becomes No.

If the result of determination in step S31 is that the release button has been pressed down half way, then in the case where the first release has transitioned from off an AE/AF operation is executed (S33). Here, the AE processing section 111 detects subject brightness based on image data acquired by the image sensor 103, and calculates shutter speed and aperture value etc. for correct exposure based on this subject brightness.

Also, an AF operation is carried out in step S33. Here, the driver 205 moves focus position of the photographing lens 201 by means of the microcomputer 207 inside the interchangeable lens 200, so that a focus evaluation value that has been acquired by the AF processing section 113 becomes a peak value. As a result, if the release button is pressed down halfway when movie shooting is not being carried out, focusing of the photographing lens 201 is carried out at that point in time. After that processing advances to step S35.

If the result of determination in step S31 is that the release button has not transitioned from off to the first release, it is next determined whether or not the release button has been pressed down fully, and the second release switch has been turned on (S37). In this step, the state of the second release switch that is linked to the release button is detected by the operation section 123, and determination is carried out based on the result of detection.

If the result of determination in step S37 is that the release button is pressed down fully and that the second release which has been turned on, still image shooting is carried out using the mechanical shutter 101 (S39). Here, the diaphragm 203 is controlled with the aperture value that was calculated in step S33, and the shutter speed of the mechanical shutter 101 is controlled with the calculated shutter speed. Then, once the exposure time corresponding to the shutter speed has elapsed, image signals are read from the image sensor 103, and RAW data that has been processed by the analog processing section 105 and the A/D conversion section 107 is output to the bus 110.

Once shooting using the mechanical shutter 101 has been carried out, image processing is carried out (S41). Here, RAW data that has been acquired by the image sensor 103 as a result of shooting using the mechanical shutter 101 is read out, and image processing is carried out by the image processing section 109. Detailed operation of this image processing will be described later using FIG. 8.

Once image processing has been carried out, still picture storage is next carried out (S43). Here, image data for a still picture to which image processing has been applied is stored in the storage medium 131. In the case of having shot with a combined photograph, the in the event that it is desired to cancel (delete) part of an image within the combined photograph, it is possible to delete using a cancel operation. Detailed operation of this still picture storage will be described later using FIG. 13.

Once still picture storage has been carried out, it is next determined whether or not combined photograph mode has been set (S45). As described previously, combined photograph mode is set on a menu screen etc., and in this step whether or not this combined photograph mode has been set is determined.

If the result of determination in step S45 is that combined photograph mode has been set, update to live view (LV) display is carried out (S47). If combined photograph mode has been set, live view display is updated in accordance with a style (template, refer to FIG. 5) and a number of images. In a case where live view display is carried out all the time for all frames, live view display is carried out at parts other than where there are already taken images. Also, in the case of live view display one frame at a time (refer to the display method of FIG. 2), live view display is switched from a taken frame to the next frame (for example, in display panels 135 a-135 e of FIG. 2, in the order upper left→upper right→lower left→lower right). In either case, taken frames display taken images. It is also possible to display so as to know which are already taken images and which is live view display, using OSD (on-screen display), and it is also possible for already taken images to be displayed so as to know the order in which they were taken. After that processing advances to step S35.

If the result of determination in step S37 was not release operation 2nd, that is in the case where the second release switch is not on, AE is next carried out (S51). In the case where S37 is passed through from previously described step S31, it is a situation where no operation was carried out for the release button, and in this case live view display of step S57, which will described later, is carried out. In step S51, exposure control is carried out in order to carry out live view display. Specifically, shutter speed and ISO sensitivity for the electronic shutter of the image sensor 103 in order to carry out live view display at the correct exposure are calculated.

Once AE has been carried out, shooting using the electronic shutter is carried out (S53). Here image data is acquired using the electronic shutter of the image sensor 103. Next, image processing is carried out on the acquired image data (S55). The image processing here is for live view display, and in the case where a special effect has been set, image processing in accordance with the set special effect is also carried out. Detailed operation of this image processing will be described later using FIG. 8.

If image processing has been carried out, live view display on the display panel 135 is carried out (S57). Image data is acquired in step S53, and image processing is carried out in step S55, and so in this step update of the live view display is carried out. A photographer can determine composition and photo opportunity by looking at the live view display.

Once live view display has been carried out in step S57, it is determined whether or not movie storage is in progress (S59). Here it is determined whether or not the storage in progress flag is on. If the result of this determination is that movie storage is in progress, movie storage is carried out (S61). Here, image data read out from the image sensor 103 is subjected to image processing to give image data for a movie, and stored in a movie file. After that processing advances to step S35.

In step S35 it is determined whether or not to power off. In this step it is determined whether or not the power supply button of the operation section 123 has been pressed again. If the result of this determination is not power off, processing returns to step S3. On the other hand, if the result of determination is power off, a termination operation of the main flow is executed and then the main flow is terminated.

In this way, with the main flow of the one embodiment of the present invention, in the case where combined photograph mode is set playback/editing is possible (S23), shooting is carried out if the release button is pressed down fully (release operation second), and update of live view display is performed.

Next, the image processing of steps S41 and S55 will be described using the flowchart shown in FIG. 8. If the image processing flow is entered, basic image processing is first carried out (S71). Here, the basic image processing section 109 a applies optical black (OB) subtraction, white balance (WB) correction, demosaicing processing, color reproduction processing, brightness change processing, edge enhancement processing, noise removal (NR) processing etc. to image data that has been read out from the image sensor 103 and subjected to AD conversion by the A/D conversion section 107. Detailed operation of this basic image processing will be described later using FIG. 9.

If basic image processing has been carried out, it is next determined whether or not art filter has been set (S73). An art filter is set in the previously described camera setting (S9), and so in this step it is determined whether or not an art filter has been set.

If the result of determination in step S73 is that an art filter has been set, special image processing is carried out (S75). Here, special image processing is applied in accordance with the type of art filter that has been set. Detailed operation of this special image processing will be described later using FIG. 10.

If special image processing has been carried out, or if the result of determination in step S73 is that an art filter has not been set, it is next determined whether or not it is a combined photograph (S77). If the result of this determination is that combined photograph mode has been set, combined photograph creation is carried out (S79). With this combined photograph creation, preprocessing such as resizing and rotation is carried out, and after carrying out color change and brightness change image combination is carried out in accordance with a style (template), to create a combined photograph. Detailed operation of this combined photograph creation will be described later using FIG. 11.

If combined photograph creation is carried out, or if the result of determination in step S77 is that combined photograph mode has been set, the originating processing flow is returned to.

In this way, with the image processing of this embodiment, after carrying out basic image processing and carrying out special image processing as required, combined photograph creation is carried out if combined photograph mode has been set.

Next, detailed operation of the basic image processing in step S71 (FIG. 8) will be described using the flowchart shown in FIG. 9. If the basic image processing flow is entered, first optical black (OB) calculation is carried out (S81). In this step, an optical black value, which is ascribable to dark current etc. of the image sensor 103, is respectively subtracted from a pixel value of each pixel constituting the image data by an OB calculation section within the basic image processing section 109 a.

Once OB calculation has been carried out, white balance (WB) correction is carried out (S83). In this step WB correction is carried out on image data by the WB correction section within the basic image processing section 109 a, in accordance with a white balance mode that has been set in advance. Specifically, correction is carried out by reading out R gain and B gain corresponding to the white balance mode set by the user from the flash memory 125 of the camera body, and multiplying the image data of the Bayer array by these values. Alternatively, in the case of auto white balance, R gain and B gain are calculated from RAW data, and correction is carried out using these values.

Next, demosaicing processing is carried out (S85). In this step, image data that has been subjected to white balance correction is converted to data having each pixel made up of RGB data by a demosaicing processing section within the basic image processing section 109 a. Specifically, data not at that pixel is obtained by interpolation from around that pixel position, and converted to RGB data. However, in the case where RAW data is already in the same format as RGB data (such as RAW data set that has been acquired from a Foveon sensor), demosaicing processing does not need to be carried out.

Once demosaicing processing has been carried out, color reproduction processing is carried out (S87). In this step, a linear transformation to multiply the image data by a color matrix coefficient according to the set white balance mode is carried out by a color reproduction processing section within the basic image processing section 109 a, to correct the color of the image data. The color matrix coefficient is stored in the flash memory 125, and so it is read out and used.

Once color reproduction processing has been carried out, brightness change processing is carried out (S89). In this step a gamma table stored in the flash memory 125 is read out by a gamma processing section within the basic image processing section 109 a, and gamma correction processing is carried out on the image data. After Gamma conversion with RGB and color conversion to YCbCr, further gamma conversion is carried out with Y.

If gamma conversion has been carried out, edge enhancement is carried out next (S91). In this step, an edge enhancement processing section within the basic image processing section 109 a enhances edges of the image data, by extracting edge components, for image data that has been subjected to gamma correction, using a band pass filter, multiplying by a coefficient corresponding to a degree of edge enhancement, and adding to the image data.

Next, NR (noise removal) is carried out (S93). In this step an image is subjected to frequency analysis, and processing is carried out to reduce noise in accordance with frequency. Once noise removal processing has been carried out, the originating processing flow is returned to.

Next, detailed operation of the special image processing in step S75 (FIG. 8) will be described using the flowchart shown in FIG. 10.

If the flow for special image processing is entered, it is first determined whether or not toy photo has been set as an art filter mode (S101). If the result of this determination is that toy photo has been set, a shading effect is added (S103). Here, the special image processing section 109 b applies a shading effect to the periphery of the image by creating a gain map (gain values are 1 or less), such that brightness is gradually lowered in accordance with distance from the center of the image, and multiplying each pixel by a gain corresponding to the pixel.

If shading addition has been carried out, or if the result of determination in step S101 was not toy photo, it is determined whether or not fantastic focus has been set as the art filter mode (S105). If the result of this determination is that fantastic focus has been set, soft focus processing is carried out (S107). Here, the special image processing section 109 b blurs an original image, and combines this blurred image and an image before blurring at a specified ratio (for example, a ratio of blurred image:image before blurring=2:3).

If soft focus processing has been carried out, or if the result of determination in step S105 was not fantastic focus, it is next determined whether or not rough monochrome has been set as the art filter mode (S109). If the result of this determination is that the rough monochrome has been set, noise superimposing processing is carried out (S111). Here, noise addition processing is applied to the image data by the special image processing section 109 b. Noise addition processing is processing to add a previously created noise pattern image to the subject image. It is also possible to create a noise pattern image based on a random number etc.

If noise superimposing processing has been carried out, or if the result of determination in step S109 was not rough monochrome, it is next determined whether or not Diorama has been set as the art filter mode (S113). If the result of this determination is that Diorama has been set, blurring processing is carried out (S115). Here, the special image processing section 109 b carries out gradual blurring processing of the original image above and below, or to the left and right, or in accordance with distance from, a center of an AF target.

If blurring processing has been carried out, or if the result of determination in step S113 was not Diorama, it is next determined whether or not Crystal has been set as the art filter mode (S117). If the result of this determination is that Crystal has been set, cross filter processing is carried out (S119). Here, the special image processing section 109 b detects a bright point from within an image, and with this bright point as a center draws a cross shape or cross pattern, which is an effect for creating a shiny effect on a plurality of radial shapes.

If cross filter processing has been carried out, or if the result of determination in step S117 was that crystal was not set, the flow for special image processing is terminated, and the originating flow is returned to.

Next, detailed operation of the combined photograph creation in step S79 (FIG. 8) will be described using the flowchart shown in FIG. 11. As was described previously, with the flow for image processing shown in FIG. 8, first of all basic image processing is carried out, then special image processing is carried out, and next this combined photograph creation is carried out. With this combined photograph creation, images are combined in a style (template) such as is shown in FIG. 5. In carrying out this combination, roughly summarized, if there are frames that have not yet been subjected to the preprocessing outlined in steps S121-S127, preprocessing is applied. If the preprocessing has been applied, color change and brightness change etc. are carried out, image processing to embed images into the style is executed, and then image storage is carried out.

If the flow for combined photograph creation is entered, it is first determined whether or not there are frames to which preprocessing has not been applied (S121). Here, for images of all frames to be combined, it is determined whether or not preprocessing such as resizing, rotating, trimming, image analysis etc., for which it is not necessary to execute processing from step S128 and after each time, has been completed.

If the result of determination in step S121 was that there are frames that have not yet been subjected to preprocessing, resizing, rotation and trimming are carried out (S123). Here, in order to embed into a style such as is shown in FIG. 5, the combined photograph processing section 109 c carries out processing such as resizing, rotation and trimming according to the frame.

Once resizing etc. has been carried out, image analysis is next performed (S125). An original image (replacement image) to be combined is analyzed, and image features (for example brightness distribution, color distribution etc.) are acquired. It is also possible to perform analysis using an image for which image processing such as basic image processing has already been completed, or to perform analysis on raw data constituting the original image.

Once image analysis has been carried out, frame image storage is carried out next (S127). Here, images that have been subjected to the preprocessing of steps S123 and S125 are stored in the SDRAM 127. FIG. 16A shows incorporation image storage regions for display and storage in the SDRAM 127, with the region R1 being a region for number of frames incorporated into the combined photograph, and region R2 being a safe region for number of frames incorporated into the combined photograph. In this step S127, image data for images that have been subjected to preprocessing and the results of image analysis are stored in corresponding regions of the frame image region R1 (in any of frame image region 1-frame image region n).

Once frame image storage has been carried out, or if the result of determination in step S121 was that there were no frames that have not yet been subjected to preprocessing, image quality adjustment is next carried out (S128). Here, image quality adjustment is carried out for images that are stored in the frame image region. As image quality adjustment, adjustment is applied so as to give the same image quality as frames other than the combined photograph. Images after image quality adjustment are recorded in the frame image region R1. Detailed operation of this image quality adjustment will be described later using FIG. 20A-FIG. 20C, FIG. 21A and FIG. 21B.

Once image quality adjustment has been carried out, color change is next performed (S129). Here, the combined photograph processing section 109 c corrects CbCr so that images to be combined become substantially the same color. At this time processing is carried out using data for each frame image region, but the processing does not update data within a frame image region R1 of the SDRAM 127. This is in order to save data later in an MPO format.

As a color change correction method, for example, CbCr of an image is offset so that a peak of color distribution (distribution on the CbCr plane) for all images to be combined becomes an average value of each peak. This correction method will be described using FIG. 12B and FIG. 12C. The graph (b-1) in FIG. 12B shows color difference (Cb) for image 1 and image 2, while the graph (c-1) in FIG. 12C shows color difference (Cr). If color difference is offset in image 1 and image 2 respectively so that color distribution peak becomes an average value (refer to graph (b-2) in FIG. 12B and graph (c-2) in FIG. 12C), the color difference for both images becomes substantially the same (refer to graph (b-3) in FIG. 12B and graph (c-3) in FIG. 12C).

Once color change has been carried out in step S129, brightness change is next carried out (S131). Here, correction is performed so that images to be combined by the combined photograph processing section 109 c become of the same brightness. As a correction method, for example, correction is performed so that average values for each image are substantially matched to an average value for brightness distribution of all images to be combined. At this time if conversion is carried out with brightness gamma (gamma for only a luminance component), color would appear unnatural in the case where brightness was changed significantly. It is therefore possible, for example, to perform gamma correction with RGB color space after RGB conversion.

An example of brightness change will be described using FIG. 12A. The graph (a-1) of FIG. 12A shows brightness of image 1 and image 2. They are both subjected to table conversion in RGB color space (refer to graph (a-2)). As will be understood from (a-1), image 2 has a lot of low brightness components overall, and the low brightness side is raised up as a result of table conversion. After conversion, image 1 and image 1 have substantially the same brightness distribution, as shown in graph (a-3).

Once brightness change has been carried out in step S131, combination is next carried out (S133). Here, the combined photograph processing section 109 c combines each of images on a background images. Specifically, a combined photograph is created by carrying out combination by embedding images at each position of a style such as is shown in FIG. 5.

If combination has been carried out a special effect is applied next (S135). Here, a special effect such as shading or blurring is added to an image that has been combined. A special effect was added to each image in step 75 of FIG. 8, and in this step a special effect is added to a combined image.

Once a special effect has been added, image storage is next carried out (S137). Here, a combined effect is stored in a combined image storage region for display and storage. Once image storage has been carried out the originating flow is returned to.

In this way, in the flow for combined photograph creation, in the case where preprocessing has not yet been applied, processing such as resizing and image analysis are applied (S123, S125), this preprocessed image data is stored in a frame image region R1 of the SDRAM 127 (S127), and after color change and brightness change have been carried out for images that have been preprocessed (S129, S131), images for a combined photograph are combined (S133), and image storage is carried out (S137). Image data before carrying out preprocessing, color change and brightness change is stored in the frame image region R1, which means that it is possible to read out image data at the time of preprocessing when replacing with a replacement image after combined photograph creation, and it is possible to carry out appropriate color change and brightness change.

Also, in the flow for combined photograph creation, image quality adjustment is carried out so that image quality of each image of a combined photograph is the same (refer to S128). As a result, image quality of each image of a combined photograph is made the same, giving a natural impression.

Next, detailed operation of the still picture storage in step S43 (FIG. 7) will be described using the flowchart shown in FIG. 13. This still picture storage performs processing in order to shoot an image using the previously described mechanical shutter 101 (S39), subsequently execute image processing (S43), and then store the image data that has been subjected to image processing in the storage medium 131.

If the flow for still pictures storage is entered, it is first determined whether or not it is combined photograph mode (S141). If the result of this determination is that it is not combined photograph mode, it is normal mode, and QuickView display is carried out (S157). Here, images stored in the storage medium 131 are temporarily displayed for a specified time on the display panel 135. In this way it is possible for the user to confirm taken images.

Once QuickView display has been carried out, still picture storage is next carried out (S159). Besides a combined photograph, images that have been subjected to image processing are subjected to JPEG compression and stored in the storage medium 131. However, this is not limited and it is also possible to store in an uncompressed format (for example TIFF etc.), or to use another compression format. It is also possible to store RAW images.

If the result of determination in step S141 and is that it is combined photograph mode, it is determined whether or not to perform taken image storage (S143). With combined photograph mode, even in a case of embedding each image in a style such as is shown in FIG. 5, but where combined photograph mode has been set, images that are not embedded within the style can also be stored. In this step, it is determined whether or not the user has turned on a setting for whether or not to store each frame of the combined image, in the camera setting of step S9 in FIG. 6.

If the result of determination in step S143 is taken image storage, still picture storage is carried out (S145). Here, similarly to step S159, a picture is taken as a single taken image, and not a combined photograph, subjected to compression etc. using JPEG or the like, and stored in the storage medium 131.

Once still picture storage has been carried out in step S145, or if the result of determination in step S143 was not taken image storage, it is next determined whether or not combining is complete (S147). Here, a number of images that satisfies a style that has been set in advance are taken, and it is determined whether or not they have been combined. For example, with the combined photograph that was described using FIG. 2 and FIG. 3, four photographs are taken and it is determined whether or not they have been combined. Also, for example, in a case of combining four images, it is also determined that incorporation is complete in a case where two images are taken, and two images are selected from stored images.

If the result of determination in step S147 was incorporation complete, QuickView display is carried out (S149). Here, after completion of all images as a combined photograph, this combined photograph is subjected to live view display on the display panel 135. During live view display, similarly to the flow for playback, which will be described later, magnified display is also possible.

Once live view display has been carried out, it is next determined whether or not there has been a cancel operation (S151). There may these situations where the user is considering deleting some photographs and replacing them, when looking at the live view display. Therefore, with this embodiment, in the case where live view display is carried out and a cancel operation is performed within a specified time (for example, three seconds), a designated frame is canceled, and shooting can be carried out again. As a cancel operation, it is possible to perform designation on a touch panel, or to cancel using a delete button.

If the result of determination in step S151 is that the cancel operation has been carried out, a combined photograph operation is carried out (S155). Within a subroutine for the combined photograph operation, a cancel operation is executed (refer to S165-S173 in FIG. 14, which will be described later).

On the other hand, if the result of determination in step S151 is that a cancel operation has not been performed, combined photograph storage is carried out (S153). Here, combined image data for a completed combined photograph is stored in the storage medium 131.

If combined photograph storage was carried out in step S153, or if a combined photograph operation was carried out in step S155, or if the result of determination in step S147 was not incorporation complete, or if still picture storage was carried out in step S159, the originating processing flow is returned to.

In this way, in the still picture storage flow, combined photograph storage is not carried out until a number of images determined by the style have been assembled (S147→No), and storage of a combined photograph is carried out once the number of images have been assembled (S153). Also, even after completion of a combined photograph it is possible to cancel an image of the combined photograph that has been designated by carrying out a cancel operation (S151).

Next, detailed operation of the combined photograph operation of step S23 (FIG. 6) and step S155 (FIG. 13) will be described using the flowcharts shown in FIG. 14 and FIG. 15. As described previously, this combined photograph operation is executed when various operations are carried out in order to carry out editing of the combined photograph.

If the flow for combined photograph operation is entered, it is first determined whether or not a taken frame update operation has been carried out (S161), and if the result of this determination is that a taken frame update operation has been performed update of a taken frame is carried out (S163). As was described for the display panels 135 f, 135 g of FIG. 3, which frame a taken image is embedded within in a combined photograph style can be changed as appropriate. In the case where an operation to update a frame that will be taken has been performed by operation of a cross-shaped key or okay button or a touch panel operation etc., a frame to be taken is updated. At this time, in order to make known which frame is being taken, it is possible to display a border on the frame, display an icon, display frames other than the taken frame darkly, or reduce the chroma intensity of frames other than the taken frame. In the case where a frame is touched during live view display, a release operation (first release and second release, or first release only) is executed. In the case where live view display is being carried out with the plurality of frames, a frame to be taken is selected using the release button.

If update of a taken frame has been carried out in step S163, or if the result of determination in step S161 was that an update operation for a taken frame was not carried out, it is next determined whether or not a cancel operation was performed (S165). As was described for the flow for still picture storage, there are situations where some images making up a completed combined photograph are deleted, or it is desired to replace an image. With this embodiment, therefore, a frame that has been taken is canceled in cases such as when a taken frame is selected using the cross-shaped key, and the delete button is pressed, or a taken frame is dropped onto a trash bin icon on the touch panel. In this step S165 it is determined whether or not either of these operations has been performed.

If the result of determination in step S165 is that a cancel operation has been performed, it is next determined whether frame size of a touch operation is small (S167). In the case where a cancel operation has been carried out by touch operation, it is determined whether or not the size (horizontal and vertical size, or area) of a frame that should be canceled is small (for example, having an area of 1 cm² or less). This is because if the frame size is small it may result in an erroneous operation.

If the result of determination in step S167 is that the size of a frame that has been subjected to a touch operation is larger than a specified value, image saving (S169) and update of live view display are carried out (S171). Even in the case where an image has been deleted as a result of a cancel operation, there may be cases where it is desired to restore that image. Therefore, in order to be able to carry out restoration of the image (specifically in order to undo a cancel operation), a taken image that has been designated for deletion (image of a frame of the combined photograph) is saved in a separate region within temporary memory, and live view display is updated with that frame appearing in an untaken state. This image saving will be described later using FIG. 16B and FIG. 16C.

If live view display has been carried out combined photograph creation is carried out (S173). The subroutine for this combined photograph creation will be described using FIG. 11. Since an image that has been designated by a cancel operation has been deleted, in this step the combined photograph is created again using remaining images.

If combined photograph creation has been carried out in step S173, or if the result of determination in step S167 was that the frame size with a touch operation was small, or if the result of determination in step S165 was that a cancel operation was not performed, it is next determined whether or not there has been a restoration operation (S175). A restoration operation is carried out in accordance with operation of the operation section 123 or the touch panel 123 a, in cases such as when a frame it is desired to restore is selected using the cross-shaped key and a cancel button is operated, or when a trash bin icon is dragged and dropped to a frame it is desired to restore using a touch operation.

If the result of determination in step S175 is that there was a restoration operation, then next an image is restored (S177), and update of live view display is carried out (S179). Here, a saved image is returned to the original position, and live view display is updated with the appearance that that frame has been taken.

If update of live view display has been carried out, combined photograph creation is carried out (S181). The subroutine for this combined photograph creation will be described using FIG. 11. Since an image that was designated by the restoration operation has been restored, in this step the combined photograph is created again also including the restored image.

If combined a photograph creation has been carried out in step S181, or if the result of determination in step S175 was that a restoration operation was not performed, it is next determined whether or not there has been a temporary storage operation (S183 in FIG. 15). In the case where there have been a plurality of exposures in a short time and creation of a combined photograph is performed, shooting can be carried out continuously. However, in the case of creating a combined photograph using images that were taken at time intervals such as in the morning, in the daytime and at nighttime, it is convenient to be able to temporarily save images during creation of the combined photograph. With this embodiment, therefore it is possible to temporarily save images that make up the combined photograph. As a restoration operation, operations such as selecting a temporary save menu and selecting an icon are carried out using a menu screen or touch panel operation etc.

If the result of determination in step S183 is that there has been a temporary save operation, incorporated data is stored (S185). Here, the state of a currently combined photograph, specifically what photographs have been taken for which style etc., is stored in the flash memory 125 or the storage medium 131. As incorporated data that is stored, there are at least a style (information relating to a template), taken photograph data, and relational information for the photograph data and the template.

If storage of incorporated data has been carried out, the combined photograph is next reset (S187). After storage, information on the combined image that has been taken is reset to give a state that is the same as for the first exposure, namely a state where live view display and the SDRAM 127 have been reset etc.

If the reset of the combined photograph has been carried out in step S187, or if the result of determination in step S183 was that a temporary save operation was not performed, it is next determined whether or not there has been a temporary save read operation (S189). In the case where incorporated data for a combined image has been temporarily saved in steps S183 and S185, this operation is the reading out of this temporarily saved incorporated data. As the operation, a temporary save read menu or icon selection operation are carried out on a menu screen or touch panel.

If the result of determination in step S189 is that there has been a temporary save read operation, it is next determined whether or not shooting is in progress (S191). There may be situations where a temporary save read operation is carried out while a combined photograph is being taken. In this case, since it is necessary to temporarily interrupt the combined photograph shooting that is currently in progress, this is handled in steps S191-S195. In this step, it is determined whether or not combined photograph shooting mode has been set, and at least one image has been taken for the template.

If the result of determination in step S191 is that shooting of a combined photograph is in progress, whether or not to perform a temporary save is confirmed (S193). In this case, the confirmation screen for whether or not to temporarily save this current state of the shooting progress is displayed on the display panel 135, as a query to the user. If the result of this determination is to perform temporary save, storage of the incorporated data is carried out (S195). Here, the same incorporated data as in step S185 is stored in order to temporarily save the current state.

If incorporated data storage has been carried out in step S195, or if the result of determination in step S193 was not to perform temporary save, or if the result of determination in step S191 was that shooting was not in progress, next the incorporated data is read out (S197), live view display is performed (S199), and combined photograph creation is carried out (S201). Here, incorporated data that was temporarily saved in step S185 is read out, update to live view display similar to that in step S171 and step S179 is carried out, and creation of a combined photograph similar to that in step S173 and step S181 is carried out.

If creation of a combined photograph has been carried out in step S201, or if the result of determination in step S189 was that a temporary data readout operation was not carried out, operation of the combined photograph operation is completed and the originating flow is returned to.

In this way, in the flow for combined photograph operation, it is possible to update a frame to be taken among frames of a style (S163), and it is possible to delete and restore a frame (S169, S177). Further, even during combined photograph shooting, it is possible to temporarily save data, and it is possible to readout this temporarily saved data, and continue with combined photograph shooting.

Next, the image saving (S169) and image restoration (S177) that were described in the flow for the combined photograph operation will be described using FIG. 16B.

FIG. 16B shows an incorporation image storage region for display and storage, of the SDRAM 127. The left column of FIG. 16B shows a state where three pictures, from within a combined image made up of four pictures, have been taken. Specifically, data for frame image 1-frame image 3 is stored within the frame image region R1.

In a state where three pictures have been taken in FIG. 16B, if a cancel operation is performed for frame image 2 (Yes at step S165 in FIG. 14), the data for frame image 2 of the frame image region R1 is copied to frame image 2 of the saved image region R2, and data in the frame image 2 position of the frame image region R1 is deleted (refer to the middle column in FIG. 16B).

Next, if a restoration operation is performed for frame image 2 (yes at step S175 in FIG. 14) data for frame image of the saved image region R2 is copied to the position for frame image 2 in the frame image region R1. The data at the position for frame image 2 in the saved image region R2 is then deleted (refer to the right column of FIG. 16B).

In this way, with this embodiment, a frame image region R1 for storing data for frame images, and the saved image region R2 for saving of data, are provided. Therefore, if there is a cancel operation data is stored in the saved image region R2, and if there is a restoration operation the saved data is copied to the frame image region R1. As a result, it is possible to easily carry out restoration even if an image has been temporarily deleted.

With this embodiment, data is copied at the time of a cancel operation and the restoration operation. This is not limiting, however, and it can also be handled using pointers. FIG. 16C shows an example of handling with pointers.

With the example shown in FIG. 16C, a reference pointer region R3 for storing reference pointers and a frame image region R1 are provided in the combined image storage region for display and storage of the SDRAM 127. First, at the time point where three out of four images have been taken, addresses corresponding to frame image 1-frame image 3, as valid images, are stored in the reference pointer region R3 (refer to the left column in FIG. 16C).

If a cancel operation has been carried out for frame image 2, frame image 2 remains stored in the frame image region R1, but the address for frame image 2 is deleted from the reference pointer region R3 (refer to the middle column of FIG. 16C).

Then, if a restoration operation is carried out for frame image 2, the frame image 2 remains stored in the frame image region R1, and the address for frame image 2 is restored to the reference pointer region (refer to the right column in FIG. 16C).

Next, detailed operation of the Playback and editing in step S5 (FIG. 6) will be described using the flowchart shown in FIG. 17. As previously mentioned, this playback and editing is executed when image data that has already been taken is read out from the storage medium 131, and played back.

If the flow for playback and editing is entered, first of all list display is carried out (S211), and image selection is carried out (S213). Here, thumbnails for image files that are stored in the storage medium 131 are subjected to list display. The user then selects images from within the list display.

Once image selection has been carried out, it is next determined whether or not the selected image is a movie (S215). Since still pictures or movies are stored as images, determination is performed based on the format of the image.

If the result of determination in step S215 is that the selected image is a movie, a number of frames is read out (S217). Since a number of frames is stored in the movie file, this information is read out. A counter i is then initialized to 1 (S219). This counter i counts the number of frames.

Next, an ith frame is played back/displayed (S221), 1 is added to counter i (S223), and it is determined whether or not the counter i is smaller than the number of frames (S225). Here image data for the movie is read out sequentially from the first frame, and displayed on the display panel 135. Movie playback is carried out until the counter i reaches the number of frames that was read out in step S217. After that processing advances to step S227.

If the result of determination in step S215 was that the image that was selected in step S213 is a still picture, the image is read out (S229), and displayed (S231). Here, image data for a still picture that has been stored in the storage medium 131 is read out, expansion processing is performed, and the image is displayed on the display panel 135.

If display has been carried out, it is next is determined whether or not a magnification operation has been carried out (S233), and if the result of this determination is that a magnification operation has been performed magnified display is carried out (S235). During still picture display, for example, magnified display is carried out as a result of operation of a magnify button. At this time, in the case of the combined photograph, each frame is displayed magnified, or one particular frame is displayed magnified.

If magnified display is carried out in step S235, or if the result of determination in step S233 was that a magnify operation was not performed, it is next determined whether or not magnification was in progress and a display position change operation was carried out (S237), and if the result of this determination is that the change operation was carried out magnification position change is performed (S239). In the case where magnified display is in progress and a display position change operation, for example, operation of the cross-shaped key, is carried out, a portion within the image that is to be subjected to magnified display is changed. In the case of a combined photograph, this is limited to being able to change only the display position within a frame that is being magnified. In a case where there is no restriction, the same display as for a normal image is carried out.

If magnification position change has been carried out in step S239, or if the result of determination in step S237 was that a display position change operation was not performed while magnification was in progress, it is next determined whether or not it is a combined photograph and a display frame change operation has been performed (S241), and if a change operation has been performed a display frame is changed (S243). In the case of a combined photograph, if magnified display is in progress and there is a display frame change operation, for example, operation of a function button (Fn button), the frame to be subjected to magnified display is switched. At this time, a magnification position is stored for each frame, and in the case where there is an instruction to display the frame currently being displayed again, the same position is subjected to magnified display.

If display frame change has been carried out in step S243, or if the result of determination in step S241 was that there was no display frame change operation for combined photographs, it is next determined whether or not it is a combined photograph and there has been an editing operation (S245), and if the result of this determination is that there has been an edit operation, combined photograph editing is carried out (S247). In the case of a combined photograph, by selecting combined photograph editing from a menu screen, or selecting an editing icon with a touch operation, it is possible to edit a frame of a combined photograph that is currently being played back. Detailed operation of this combined photograph editing will be described later using FIG. 18.

Once combined photograph editing has been carried out in step S247, or if the result of determination in step S245 was that it was not a combined photograph and an editing operation was not performed, it is next determined whether or not display is terminated (S249). Display is terminated if a terminate display button is operated or if a terminate display icon etc. is subjected to a touch operation. If the result of determination in step this step S249 is not terminate display, step S233 is returned to and display continues. On the other hand, in the case of display termination processing advances to step S227.

If the result of decision in step S249 is not display termination, or if the result of determination in step S225 was that counter i of the movie had exceeded the number of frames, it is next determined whether or not to terminate playback (S227). If the playback button is operated once more, playback is terminated. If the result of this determination in this step is not playback termination, step S211 is returned to, and playback mode continues. On the other hand, if the result of determination is playback termination, this playback and editing flow is terminated and the originating flow is returned to.

In this way, in the playback and editing flow, operations such as movie playback, magnified display of a still picture, and editing of a combined photograph etc. are executed. With this embodiment, only combined photograph editing has been carried out, but besides this it is also possible to edit movies.

Next, detailed operation of the combined photograph editing of step S247 (FIG. 17) will be described using the flowchart shown in FIG. 18. This combined photograph editing, as was described previously, is executed when data for a completed combined photographic image is read out from the storage medium 131, and an image within the combined photograph is to be replaced with another stored image or a newly taken image.

If the flow for combined photograph editing is entered, first of all readout of incorporation images is carried out (S251). Incorporation images are read out, and a main image and subsidiary images are stored in respective storage regions of the SDRAM 127. Here, the main image is image data of the combined photograph that has been combined, and the subsidiary images are image data that has been subjected to preprocessing (refer to S123 and S125 in FIG. 11). The subsidiary images are stored so as to correspond to each frame in the frame image region shown in FIG. 16A-FIG. 16C.

Once readout of the incorporation image has been carried out, and edit frame is designated (S253). Here, the user designates which, among the plurality of frames that make up the combined photograph, is to be replaced with another image.

Once an edit frame has been designated, it is next determined whether or not to replace with a stored image (S255). As was described previously, at the time of editing it is possible to select an image that has already been stored or an image that has been newly taken. In the case of selecting an image that has already been stored, a table of already stored images is displayed and an image is selected from among the displayed images. On the other hand, in the case of taking a new image, there is a transition to a shooting standby state, and an image is acquired by executing live view display for shooting, and a shooting sequence. Whether to replace with a stored image or to replace with a taken image is selected using a menu screen or icon display.

If the result of determination in step S255 is to replace with a stored image, list display is carried out (S257), and image selection performed (S259). Here, similarly to step S211 and S213 (FIG. 17), thumbnails for image files that are stored in the storage medium 131 are subjected to list display. The user selects an image for replacement from within the list display by operating the cross-shaped key and the okay button etc.

Once image selection has been carried out, image readout is carried out next (S261). Here, image data that was selected in step S259 is read out from the storage medium 131.

If the result of determination in step S255 is that the image for replacement is not a stored image, specifically if an image for replacement is a newly taken image, it is next detected if a release operation has transitioned from off to 1st (S273). Here it is detected whether or not the release button has been pressed down half way. There is a transfer to the shooting preparation state as a result of pressing the release button down half way. If the result of determination in step S273 is that there has been a 1st transition of the release operation from off, AE/AF is next carried out (S275). Similarly to step S33 (FIG. 7), the AE operation and AF operation are executed here. Once AE and AF have been carried out, step S273 is returned to.

If the result of determination in step S273 is that there has not been a first transition from release operation off, it is next determined whether or not it is release operation 2nd (S277). Here it is detected whether or not the release button has been pressed down fully. If the result of this determination is that there has not been a release operation second, AE is carried out (S281), shooting is performed using the electronic shutter (S283), image processing is carried out (S285), and live view display is carried out (S287). Operation in steps S281-S287 is the same as was described previously for steps S51-S57 in FIG. 7, and so detailed description will be omitted. Once live view display has been carried out, processing returns to step S273.

If the result of determination in step S277 is that there is a release operation 2nd, next shooting is carried out using the mechanical shutter 101 (S279). Specifically, it is possible for the user to acquire an image that is to replace a frame of the combined photograph by looking at the live view display and pressing the release button down fully. If exposure is finished in the shooting using the mechanical shutter 101, RAW data is acquired.

Once image data has been read out in step S261, or if exposure using the mechanical shutter 101 in step S279 is finished, it is next determined whether the data format of the image is raw data (S263). The image data acquired in step S279 is RAW, but the image data that has been read from the storage medium 131 includes various formats, such as RAW and JPEG. In the case of RAW data, the basic image processing and special image processing of steps S265-S269 are carried out. In the case of JPEG data image processing has already been performed, and so these image processing steps are skipped.

If the result of determination in step S263 is that it was RAW data, basic image processing is carried out next (S263). This basic image processing is the flow shown in FIG. 9, and so detailed description will be omitted. Once basic image processing has been carried out, it is determined whether or not art filter has been set (S267), and if the result of this determination is that art filter has been set special image processing is carried out (S269). This special image processing is the flow shown in FIG. 10, and so detailed description will be omitted.

If special image processing has been carried out in step S269, or if the result of determination in step S263 was that it was not raw data, or if the result of determination in step S267 was that art filter has not been set, combined photograph creation and storage is carried out next (S271). Since image data for a stored image that has been designated as a replacement image is read out in step S261, or image data for a taken image that has been newly taken as a replacement image is acquired in step S279, in this step a combined photograph is created by replacing an image of one frame of the combined image with the replacement image. Detailed operation of this combined photograph creation and will be described using FIG. 19.

In this way, with the flow for combined photograph editing, an image for replacement within the combined photograph is selected from among stored images (S257-S261), or is acquired by new shooting (S279). Then, a new combined photograph is created using the combined photograph on the replacement image (S271).

Next, detailed operation of the combined photograph creation and storage in step S271 will be described using the flowchart shown in FIG. 19. If the flow for this combined photograph creation and storage is entered, combined photograph creation is first carried out (S291). Here, the flow that was described in FIG. 11 is executed. Specifically, after carrying out preprocessing for each frame making up the combined photograph, adjustment is performed for each frame by carrying out color change and brightness change etc., so that there is no incongruity. Also, image quality adjustment is carried out so that differences in image quality due to differences in compression ratio etc. are not noticeable. Once the color, brightness and image quality of each frame has been adjusted, a combined photograph is created by carrying out combining.

Once combined photograph creation has been carried out, still picture storage is carried out next (S293). Here, data of the combined photograph that was created in step S291 is stored in the storage medium 131.

Next, operation off the image quality adjustment in step S128 (FIG. 11) will be described using the flowcharts shown in FIG. 20A-FIG. 20C, FIG. 21A and FIG. 21B. In carrying out combined photograph creation, when combining each image (frame) constituting the combined photograph image quality degradation and differences in image quality arise due to image compression. In image quality adjustment, therefore, the above-described problem is solved by adjusting the replacement image to have the same image quality as other images of the combined photograph besides the replacement image.

There are various methods for carrying out this image quality adjustment, and in this embodiment any one of a total of five methods in FIG. 20A-FIG. 20C, FIG. 21A and FIG. 21B is used.

The image quality adjustment flow shown in FIG. 20A is the simplest method. If the image quality adjustment flow of FIG. 20A is entered, first of all incorporation image quantization parameters are acquired (S301). Here, a quantization table stored in incorporation images to be edited (images making up the combined photograph, except the replacement image) is read from a header.

Once the quantization parameters of the incorporation images have been acquired, image quality change processing is carried out next (S303). Here, the read-out quantization table is designated, and image quality change processing is carried out for an image for recombination (replacement image for combining with the combined photograph) that has been subjected to resizing and rotation etc. Specifically, since quantization parameters for the combined photograph were acquired in the previous step, image quality of the replacement image is adjusted using these quantization parameters so as to become substantially the same as that of other images of the combined photograph. There are various methods for this image quality change processing, and they will be described later using FIG. 22A-FIG. 22D.

The image quality adjustment flow shown in FIG. 20B determines whether or not image adjustment is carried out in accordance with size of an image file. If the flow for image quality adjustment of FIG. 20B is entered, it is first determined whether or not the original size (image size of the replacement image) is larger than an incorporation size (size of an image to be replaced that constitutes the combine photograph) (S311). Here, whether the size of the replacement image is larger than the incorporation size (size of an image to be replaced that constitutes the combined photograph) is determined from the size of the image file. In more detail, since the image file contains not only purely the image but also information relating to the image, a thumbnail image (a simple reduced image) etc., the image file size and the image size do not match. Since image size of only the image is stored in an EXIF tag region within the image file, this region is referenced. If the image size of the replacement image is larger than that of the image to be replaced, reduction processing is carried out when combining with the combined photograph. If reduction processing is carried out it results in a lots of high-frequency components, and so difference in image quality from other images to be incorporated will become significant. On the other hand if image size of the replacement image is smaller than the image to be replaced, the effects of these types of high-frequency components can be disregarded. Once image quality change processing has been carried out, the originating processing flow is returned to.

If the result of determination in step S311 is that the original size (image size of the replacement image) is larger than the incorporation size (image size of the image to be replaced), quantization parameters of the incorporation image are acquired (S313), and image quality change processing is carried out (S315). These two steps are the same as previously described steps S301 and S303, and so detailed description will be omitted. On the other hand, if the result of determination in step S311 is that the original size is smaller than the incorporation size, processing of steps S313 and S315 is not carried out.

Once image quality change processing has been carried out in step S315, or if the result of determination in step S311 was that the original size was smaller than the incorporation size, the flow for image quality adjustment is terminated and the originating processing flow is returned to.

The image quality adjustment flow shown in FIG. 20C determines whether or not image quality adjustment is carried out by performing image analysis. If the flow for image quality adjustment shown in FIG. 20C is entered, first of all image analysis is carried out (S321). Analysis of degree of high-frequency components is carried out for an image to be recombined (replacement image) that has been subjected to resizing and rotation etc. Specifically, this analysis is carried out by converting to a frequency space and acquiring signals for high-frequency components.

If image analysis is been carried out, next quantization parameters for the incorporation image are acquired (S323). Here, similarly to step S301, a quantization table stored in incorporation images to be edited (images making up the combined photograph, except the replacement image) is read from a header.

If quantization parameters for the incorporation image have been acquired, it is next determined whether or not there are a lot of high frequencies (S325). Here, high-frequency components that can reappear in a general scene are calculated in advance for all quantization tables used with the camera, and stored in the flash memory 125, then these values are compared with values of high frequency components acquired using the quantization table that has been read from the incorporation image. Specifically the incorporation image to be edited (image constituting the combined photograph except for the replacement image) is compared with the general scene, and it is determined whether or not there are a lot of high-frequency components.

If the result of determination in step S325 is that there are lots of high frequencies, image quality change processing is carried out (S327). Here, as was described previously, the read out quantization table is designated, and image quality change processing is carried out for an image for recombination (replacement image for combining with the combined photograph) that has been subjected to resizing and rotation etc. This image change processing will be described later using FIG. 22A-FIG. 22D.

Once image quality change processing has been carried out in step S327, or if the result of determination in step S325 was that there were few high frequencies, the flow for image quality adjustment is terminated and the originating processing flow is returned to.

The image quality adjustment flow shown in FIG. 21A changes image quality adjustment in accordance with image analysis results. With the image quality adjustment flow of FIG. 20C described previously, image quality change processing was only carried out in the case where the result of image analysis was that there were lots of high frequencies, but with this image quality adjustment flow of FIG. 21A image quality adjustment is carried out in accordance with image analysis results even if there are few high frequencies.

If the image quality adjustment flow of FIG. 21A is entered, then steps S321-S327 are the same as the image quality adjustment flow shown in FIG. 20C, and so detailed description will be omitted. If the result of determination in step S325 is that there are few high frequencies, image quality change processing is carried out (S329). With this image quality change processing, image quality of an image that has already been incorporated is changed using a quantization table corresponding to signals of high-frequency components acquired through image analysis. In the case where a replacement image was a low-frequency scene, it is possible to adjust image quality to that of an image accordingly having an overall featureless impression.

The image quality adjustment flow shown in FIG. 21B compares quantization tables of two images, and changes image quality change processing in accordance with the result of this comparison. If the image quality adjustment flow of FIG. 21B is entered, first of all, as in step S301, incorporation image quantization parameters are acquired (S331). Here, a quantization table stored in incorporation images to be edited (images making up the combined photograph, except the replacement image) is read from a header.

If quantization parameters for the incorporation image have been acquired, next, quantization parameters are acquired for the replacement image (S333). Here, a quantization table stored in the replacement image is read from a header.

If quantization parameters have been acquired for the replacement image, next, correction of the quantization parameters is carried out in accordance with resizing of the replacement image (S335). Here, for a quantization table stored in the image for replacement in editing (replacement image), the quantization table is corrected in accordance with reduction ratio at the time of resizing. Specifically, values are made smaller as an image is reduced, or made larger in the case of magnification.

If correction of quantization parameters has been carried out, next quantization tables are compared (S337). Here, in the case where a quantization table of an incorporation image to be edited (image constituting the combined photograph except the replacement image) is smaller than a quantization table that has been corrected in step S335, then the decision is “No” in this step since image quality of the replacement image is deteriorated by editing. On the other hand, if the incorporation image quantization table is larger, the decision is “yes”. Comparison of quantization tables can also be comparison of values of specific elements within the quantization tables.

If the result of determination in step S337 was Yes, image quality change processing is carried out (S339). Here, a quantization table stored in an incorporation image to be edited (images making up the combined photograph, except the replacement image) is designated, and image quality change processing is carried out for an image (image to be combined with incorporation image, replacement image) to be recombined that has been subjected to resizing and rotation etc.

If the result of decision in step S337 was No, image quality change processing is carried out (S341). Here, image quality of images (images making up the combined photograph, except the replacement image) that have already been incorporated are changed using the quantization table that was corrected in step S335. In this way it is possible to change the image quality of other images to match that of an image to be recombined (replacement image).

If image quality change processing has been carried out in steps S339, S341, the flow for image quality adjustment is terminated and the originating processing flow is returned to.

In this way, in the flow for image quality adjustment of this embodiment, adjustment is carried out so that image quality of images that constitute the combined photograph, except for a replacement image, and image quality of the replacement image, become substantially the same. As a result, image quality when combining the replacement image with a plurality of images that constitute the combined photograph becomes substantially the same, and it is possible to compose a combined photograph that appears natural without any incongruity.

Next, operation of the image quality change processing of steps S303, S315, S327, S329, S339, and S341 (FIG. 20A-FIG. 20C, FIG. 21A, FIG. 21B) will be described using the flowcharts shown in FIG. 22A-FIG. 22D. There are various methods for carrying out this image quality change processing, and in this embodiment any one of a total of four methods in FIG. 22A-FIG. 22D is used.

If the flow for pattern 1 image quality change processing shown in FIG. 22A is entered, JPEG compression is first carried out (S351). Here, JPEG compression is carried out using a designated quantization table. If JPEG compression has been carried out, JPEG expansion is carried out next (S353). Here, the data that was subjected to JPEG compression is expanded. In this way, image quality is balanced using JPEG.

Next, if the flow for pattern 2 image quality change processing shown in FIG. 22B is entered, there is first conversion to a frequency region (S361). Here, frequency conversion (for example, discrete cosine transform (DCT)), the same as at the time of storage, is carried out on an image to be reincorporated (an image that has been selected or taken, replacement image).

If there has been conversion to a frequency region, quantization is next applied (S363). Here, quantization that is the same as that at the time of storage is carried out on the data that that was subjected to frequency conversion in step S361. At this time, a designated quantization table is used.

If quantization has been carried out, next inverse quantization is carried out (S365). Here, the data that was quantized in step S363 is returned. If inverse quantization is carried out, there is next conversion to an image space (S367). Here, the data that has been subjected to inverse quantization is converted to image space using a designated quantization table. If conversion to image space has been performed, the originating processing flow is returned to.

Next, if the flow for pattern 3 image quality change processing shown in FIG. 22C is entered, first a low pass filter (LPF) coefficient is calculated (S371). Here, an LPF coefficient is calculated in accordance with the designated quantization table. The LPF coefficient is made a coefficient that passes higher frequencies as the steps in which quantization is carried out become finer, and which cuts off higher frequencies more as the quantization steps become coarser.

If an LPF coefficient has been calculated, LPF processing is next carried out (S373). Here, low pass processing is carried out for the whole image.

In this way, with the pattern 3 image quality change processing, image quality is changed using a low pass filter. As high-frequency components of an image increase, it has a greater effect at the time of composing a combined photograph. For this reason, with the pattern 3 image quality change processing, quantization is not carried out, and instead a similar effect is acquired with a low pass filter.

Next, if the pattern 4 image quality change processing shown in FIG. 22D is entered, calculation of a reduction ratio is first performed (S381). Here, a reduction ratio is calculated in accordance with a designated quantization table. As quantization steps become fine the reduction ratio approaches 1 (the same size), and the ratio is reduced as the quantization steps become course.

If calculation of a reduction ratio has been performed, reduction is next carried out (S383). Here, the whole image is reduced. This is followed by magnification (S385). Here, the reduced image is magnified to return to the original size.

In this way, with the pattern 4 image quality change processing, image quality is change by carrying out reduction and magnification of the image. As a result of reduction and magnification of the image, the same effect as that of a low pass filter can be obtained. With the pattern 4 image quality change processing, therefore, quantization is not carried out, and instead the same effect is applied with reduction and magnification.

Next, the effect of the image quality adjustment (refer to S128 in FIG. 11, and FIG. 20A-FIG. 22D) of this embodiment will be described using FIG. 23. The image (b) in FIG. 23 is displayed on the display panel 135, and is an example of a combined photograph that is the subject of editing. With this combined photograph, the combined photograph has been made up of four images, namely photographs (P1)-(P4). Within these four images, the upper left image (P1) is to be replaced with the replacement image shown in image (a) of FIG. 23, by combined photograph editing (S5 in FIG. 6, S247 in FIG. 17, and FIG. 18).

As is apparent from the images (a) and (b) shown in FIG. 23, the size of the image (P1) that is the subject of replacement is smaller than that of the replacement image. Therefore, resizing as shown in image (c) in FIG. 23 is carried out (resizing is S123 in FIG. 11). If reduction is performed by resizing, apparent resolution increases. If this resized replacement image replaces image (P1) as it is, then as shown in image (d) that is displayed on the display panel 135, compared to the other images (P2)-(P4) since the apparent resolution of image (P1) is high there is lack of uniformity in image quality, resulting in a combined photograph that has incongruities.

The resized image shown in image (c) in FIG. 23 is compressed using the same quantization table as for the combined image to be edited. In this way it is possible to adjust to the same image quality level as for other images (P2)-(P4) without incongruities. This image quality adjustment may be carried out with a suitable combination of the various methods as shown in FIG. 20A the-FIG. 22D (for example, using a low pass filter or the like).

The image (e) shown in FIG. 23 is an image that has been adjusted to the same image quality level using JPEG etc., and if this replacement image replaces the image (P1) within the image (b) of FIG. 23, then as shown in the image (f) in FIG. 23, the image quality of the four images is substantially the same, and there is a sense of unity resulting in a combined image with a natural feel. The image (f) is the image that is displayed on the display panel 135.

Conventionally, dividing a screen up and displaying a plurality of image has generally been carried out. However, if quantization is performed for every divided image by assigning a different quantization table for respective quantization steps, it was possible to keep degradation in image quality for respective images small, but in the case of handling a single image that has been combined, there are cases where an appropriate quantization table may not be assigned for each region due to limitations of file format or hardware etc.

With a combined image that is formed from a plurality of images, it is important to maintain a sense of unity. As elements in the sense of unity, there are tone, contrast, color reproduction (white balance (WB), hue, intensity), resolution, screen smoothness etc. In the case where a combined photograph is compressed using JPEG etc., frequency characteristics may vary significantly with scene combinations, with block noise being noticeable in low-frequency scenes, and resolution being lowered in high-frequency scenes. As a result, with conventional image editing devices, if image editing was carried out to replace a single combined photograph, differences arose in resolution and smoothness, resulting in a combined photograph that lacked a sense of unity and had incongruities. With the one embodiment of the present invention, as described above, image editing is possible that gives a combined photograph with a sense of unity.

As has been described above, the image editing device of the one embodiment of the present invention replaces part of a first image (combined photograph) that has been subjected to lossy compression with a second image (replacement image), and comprises an image quality adjustment section (combined photograph processing section 109 c, S128 in FIG. 11) for performing image quality change processing that is the same as image quality variation caused by lossy compression on the second image (replacement image), and an editing section (combined photograph processing section 109 c, S133 in FIG. 11) for carrying out editing processing using the second image (replacement image) that has been adjusted by the image quality adjustment section. Therefore, in a case where part of an image has been replaced with another image in combined photograph editing etc., since replacement is carried out after adjustments so that image quality is the same as the other image, there is no difference in image quality in the image after replacement, and in particular it is possible to match up the apparent resolution. As a result, even if editing is carried out, a combined photograph editing effect is obtained giving a natural impression without the occurrence of incongruities.

The image editing device of the one embodiment of the present invention edits a combined photographic image that is made up of a combination of a plurality of images, and comprises a first image designation section (operation section 123, refer to S241 in FIG. 17) for designating one image from among a plurality of images constituting the combined photograph, a second image designation section (operation section 123, refer to S253 in FIG. 18) for designating a replacement image for replacing the image that has been designated by the first image designation section, an image compression processing section (image compression and expansion section 115) for subjecting an image to lossy compression using quantization table values representing the combined photographic image, an image quality adjustment section (combined photograph processing section 109, S128 in FIG. 11) for carrying out image quality variation processing, that is the same as image quality variation arising as a result of lossy compression, on the replacement image, a storage section (flash memory 125) for storing images and quantization table values, and a control section (combined photograph processing section 109 c, S133 in FIG. 11) for replacing an image that has been designated by the first image designation section with the replacement image that has been designated by the second image designation section after lossy compression has been performed by the image quality adjustment section with quantization table values for lossy compression.

The image editing device of the one embodiment of the present invention is provided with an imaging section for repeatedly imaging a field of view (image sensor 103 etc.), and a replacement image is an image that was repeatedly formed by the imaging section (refer to S255 No→S273→S277 Yes→S279 in FIG. 18). This means that it is possible to create a combined photograph while taking pictures, and not be limited to images that have already been taken and stored.

The one embodiment of the present invention has been described using an example where the present invention is applied to a camera, but this is not limiting, and it is also possible to apply the present invention to an image editing device for creating a combined photograph using already taken images, and to an image editing device that does not have a photographing function, such as a personal computer.

Further, with the one embodiment of the present invention, a device for taking pictures has been described using a camera, but as a camera it is also possible to use a digital single lens reflex camera or a compact camera, or a camera for movie use such as a video camera, and further to have a camera that is incorporated into a mobile phone, a mobile information terminal (PDA: Personal Digital Assistant), game console etc. In any event, it is possible to adopt the present invention as long as a device is capable of shooting combined photographs.

Also, regarding the operation flow in the patent claims, the specification and the drawings, for the sake of convenience description has been given using words representing sequence, such as “first” and “next”, but at places where it is not particularly described, this does not mean that implementation must be in this order.

The present invention is not limited to these embodiments, and structural elements may be modified in actual implementation within the scope of the gist of the embodiments. It is also possible form various inventions by suitably combining the plurality structural elements disclosed in the above described embodiments. For example, it is possible to omit some of the structural elements shown in the embodiments. It is also possible to suitably combine structural elements from different embodiments. 

What is claimed is:
 1. An image editing device, for editing a combined photographic image formed by combining a plurality of images, comprises: a first image designation section for designating a single image from a plurality of images that make up the combined image; a second image designation section for designating a replacement image for replacing the image that has been designated by the first image designation section; an image compression processing section for subjecting an image to lossy compression with quantization table values that represent the combined image; an image quality adjustment section for carrying out image quality adjustment processing, that is the same as image degradation occurring as a result of the lossy compression, on the replacement image; a storage section for storing the image and the quantization table values; and a control section for subjecting the replacement image that has been designated by the second image designation section to lossy compression with the quantization table values in the image quality adjustment section, and replacing with an image that has been designated by the first image designation section after expansion.
 2. The image editing device of claim 1, wherein the image quality adjustment section carries out low pass filter processing.
 3. The image editing device of claim 1, further comprising: an imaging section for repeatedly imaging a field of view, wherein the replacement image is an image that was repeatedly formed by the imaging section.
 4. An image editing method for editing a combined photographic image formed by combining a plurality of images, comprising: designating a single image from a plurality of images that make up the combined image; designating a replacement image for replacing the designated image; subjecting an image to lossy compression with quantization table values that represent the combined image; carrying out image quality adjustment processing, that is the same as image degradation occurring as a result of the lossy compression, on the replacement image; storing the image and the quantization table values; and subjecting the designated replacement image to lossy compression with the quantization table values, and replacing with a single image from the plurality of images that make up the combined image that has been designated after expansion.
 5. A non-transitory storage medium for storing a program for execution on a computer of an image editing device for editing a combined photographic image formed by combining a plurality of images, comprising: designating a single image from a plurality of images that make up the combined image; designating a replacement image for replacing the designated image; subjecting an image to lossy compression with quantization table values that represent the combined image; carrying out image quality adjustment processing, that is the same as image degradation occurring as a result of the lossy compression, on the replacement image; storing the image and the quantization table values; and subjecting the designated replacement image to lossy compression with the quantization table values, and replacing with a single image from the plurality of images that make up the combined image that has been designated after expansion.
 6. An image editing device, for editing a combined photographic image formed by combining a plurality of images, comprises: a first image designation control that designates a single image from a plurality of images that make up the combined image; a second image designation control that designates a replacement image for replacing the image that has been designated by the first image designation control; an image compression processor that subjects an image to lossy compression with quantization table values that represent the combined image; an image quality adjustment processor that carries out image quality adjustment processing, that is the same as image degradation occurring as a result of the lossy compression, on the replacement image; a memory that stores the image and the quantization table values; and a control processor that subjects the replacement image that has been designated by the second image designation control to lossy compression with the quantization table values in the image quality adjustment processor, and replaces with an image that has been designated by the first image designation control after expansion. 